#ifndef COLLISIONPOLYGON_H
#define COLLISIONPOLYGON_H

#include <QDeclarativeItem>
#include <QPolygon>
#include <QVariantList>

#include "collisionobject.h"

class CollisionPolygon : public CollisionObject
{
    Q_OBJECT

public:
    explicit CollisionPolygon(QDeclarativeItem *parent = 0);

    Q_PROPERTY(QVariantList vertices READ vertices WRITE setVertices NOTIFY verticesChanged)
    QVariantList vertices() { return m_Vertices; }
    void setVertices(QVariantList vertices);

    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
               QWidget *widget);

signals:
    void verticesChanged(QVariantList &vertices);

public slots:

private:
    QVariantList m_Vertices;
    QPolygon m_Polygon;

};

#endif // COLLISIONPOLYGON_H
